<div class="modal-header">
  <a href="" class="close" ng-click="$dismiss()">
    <span class="fa fa-times"></span>
  </a>
  <div class="h3 modal-title" translate>
    Delete Files in {$ ctrl.model.container.name $}
  </div>
</div>

<div class="modal-body">
  <p>
    <span ng-if="ctrl.model.mode === 'discovery'" translate>
      Collecting information for deletion:
    </span>
    <span ng-if="ctrl.model.mode === 'deletion'" translate>Deleting:</span>
    <translate>
      {$ ctrl.model.counted.files $} files in
      {$ ctrl.model.counted.folders $} folders.
    </translate>
  </p>
  <p ng-if="ctrl.model.mode === 'deletion' && ctrl.model.deleted.failures"
     class="text-danger" translate>
    Encountered {$ ctrl.model.deleted.failures $} failures.
  </p>
  <uib-progressbar ng-if="ctrl.model.mode === 'deletion'"
               max="ctrl.model.counted.files + ctrl.model.counted.folders"
               value="ctrl.model.deleted.files + ctrl.model.deleted.folders + ctrl.model.deleted.failures"></uib-progressbar>
</div>

<div class="modal-footer">
  <button class="btn btn-default" ng-click="ctrl.dismiss()" ng-if="ctrl.model.mode === 'discovery'">
    <span class="fa fa-close"></span>
    <translate>Cancel</translate>
  </button>
  <button class="btn btn-danger" ng-disabled="ctrl.model.running" ng-click="ctrl.action()">
    <translate ng-if="ctrl.model.mode === 'discovery'">Delete</translate>
    <translate ng-if="ctrl.model.mode === 'deletion'">OK</translate>
  </button>
</div>
